using AutoMapper;
using Terra.Data.Entities.Logging;
using Terra.Data.Models.Loggings;
using Terra.Service.Logging.DTOs;

namespace Terra.Service.Logging.Mappers;

/// <summary>
/// 日志模块对象映射配置
/// </summary>
public class LoggingMapperProfile : Profile
{
    /// <summary>
    /// 构造函数
    /// </summary>
    public LoggingMapperProfile()
    {
        // 登录日志映射
        CreateMap<LoginLog, LoginLogDto>();
        CreateMap<CreateLoginLogRequest, LoginLog>();

        // 异常日志映射
        CreateMap<ExceptionLog, ExceptionItemDto>();
        CreateMap<ExceptionLog, ExceptionDetailDto>();
    }
}